<?php session_start();
	require_once("connect.php");
	$cekin=$_SESSION['cekin'];
	$cekout=$_SESSION['cekout'];
	$qty_org=$_SESSION['qty_org'];
	$qty_room=$_SESSION['qty_room'];
	$id_hotel=$_SESSION['id_hotel'];
	
	$sql = "select view_ref_biaya.id_jenis_kamar,view_ref_biaya.jenis_kamar,count(no_kamar) as jml,kapasitas,ppn, harga_hari from kamar_kosong,view_ref_biaya where kamar_kosong.id_hotel=$id_hotel and kamar_kosong.id_hotel=view_ref_biaya.id_hotel and kamar_kosong.id_jenis_kamar=view_ref_biaya.id_jenis_kamar group by kamar_kosong.id_jenis_kamar";
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Free Hotel Website Template - designed by TemplateMonster</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="description" content="This is a wonderful homepage of the Free Hotel Website Template provided by TemplateMonster."/>
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="layout.css" rel="stylesheet" type="text/css" />
<script src="maxheight.js" type="text/javascript"></script>
</head>
<body id="page1" onload="new ElementMaxHeight();">
<div id="main">
<!-- header -->
	<div id="header">
		<div class="row-1">
			<div class="wrapper">
				<div class="logo">
					<h1><a href="index.html">Indonesian Hotels</a></h1>
					<em>Hotel</em>
					<strong>True Luxury</strong>
				</div>
				
			</div>
		</div>
		<div class="row-2">
	 		<div class="indent">
<!-- header-box begin -->
				<div class="header-box">
					<div class="inner">
						<ul class="nav">
					 		<li><a href="index.php">Home page</a></li>
							<li><a href="services.php">Room and Rates</a>
							<ul>
								<li><a href="indo1.php" target="_self">Indonesian Hotels 1</a></li>
								<li><a href="indo2.php" target="_self">Indonesian Hotels 2</a></li>
								<li><a href="indo3.php" target="_self">Indonesian Hotels 3</a></li>
								<li><a href="indo4.php" target="_self">Indonesian Hotels 4</a></li>
								<li><a href="indo5.php" target="_self">Indonesian Hotels 5</a></li>
								<li><a href="indo6.php" target="_self">Indonesian Hotels 6</a></li>
								<li><a href="indo7.php" target="_self">Indonesian Hotels 7</a></li>
							</ul>
							
							</li>
							<li><a href="booking.php" class="current">Booking</a>
							<ul>
								<li><a href="bookindo1.php" target="_self">Indonesian Hotels 1</a></li>
								<li><a href="bookindo2.php" target="_self">Indonesian Hotels 2</a></li>
								<li><a href="bookindo3.php" target="_self">Indonesian Hotels 3</a></li>
								<li><a href="bookindo4.php" target="_self">Indonesian Hotels 4</a></li>
								<li><a href="bookindo5.php" target="_self">Indonesian Hotels 5</a></li>
								<li><a href="bookindo6.php" target="_self">Indonesian Hotels 6</a></li>
								<li><a href="bookindo7.php" target="_self">Indonesian Hotels 7</a></li>
							</ul>

							</li>
							<li><a href="location.php">Location</a></li>
							<li><a href="gallery.php">Gallery</a></li>
							<li><a href="contact.php">Contact Us</a></li>
						</ul>
					</div>
				</div>
<!-- header-box end -->
			</div>
		</div>
	</div><div class="ic">Lovely Flash templates from TemplateMonster!</div>
<!-- content -->
	<div id="content">
		<div class="wrapper">
			<div class="aside maxheight">
<!-- box begin -->
				<div class="box maxheight">
					<div class="inner">
						<?php
					//	include_once("form_reservasi.php");
						?>
					</div>
				</div>
<!-- box end -->
			</div>
			<div id="content">
				<div class="indent">
					<h2>Indonesian Hotels 1</h2>
					<h3>2 Available Acomodation</h3>
					<p>Check-in : <?php echo $cekin; ?></p><p>Check-out : <?php echo $cekout;?></p>
					<table border="1">
						<tr>
							<td width="15%" align="center">available rooms</td>
							<td width="15%" align="center">capacity</td>
							<td width="20%" align="center">ppn</td>
							<td width="25%" align="center">cost per room</td>
							<td width="20%" align="center">action</td>
						</tr>
						<?php
							
							$exe = mysql_query($sql);
							while($list=mysql_fetch_array($exe)){
							if($qty_org<=$list[3] AND $qty_room<=$list[2]){
						?>
						<tr>
							<td width="120"><?php echo $list[1];?></td>
							<td width="120"><?php echo $list[3];?></td>
							<td width="100"><?php echo $list[4];?></td>
							<td width="100"><?php echo $list[5];?></td>
							<td>
								<a href="reserve.php?id=<?php echo $list[0];?>">Book</a>
							</td>
						</tr>
						
						<?php
							}
							}
							mysql_close($con);
						?>
					</table>
				
				</div>
			</div>

		</div>
	</div>
	
<!-- footer -->
	<div id="footer">
  		<ul class="nav">
	 		<li><a href="index.html">Home</a>|</li>
			<li><a href="services.html">Services</a>|</li>
			<li><a href="gallery.html">Gallery</a>|</li>
			<li><a href="restaurant.html">Restaurant</a>|</li>
			<li><a href="testimonials.html">Testimonials</a>|</li>
			<li><a href="booking.html">Booking</a></li>
		</ul>
		<div class="wrapper">
			<div class="fleft">Copyright (c) 2012 Indonesian Hotels</div>
		</div>
	</div>
</div>
</body>
</html>
